package cnedu.ncist.analysissimilar.web;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import edu.ncist.wang.hkdf.bussiness.blo.AbstractFlowHandler;

public class AnalysissimilarFlowHandler extends AbstractFlowHandler{
	
	public String doFlowProcess(Map paraMap) {
		String actionType = (String)paraMap.get("ACTIONTYPE");
		
		if("similar_select".equals(actionType)){
			return similar_Select(paraMap);
		}else if("similar_selectInit".equals(actionType)){
			return similar_SelectInit(paraMap);
		}else{
			ActionTypeError();
		}
		
		return null;
	}
	
public String similar_Select(Map paraMap){
	HttpServletRequest request = (HttpServletRequest)paraMap.get("REQUEST");
	Map map = (Map)paraMap.get("RESULTMAP");
	
	request.setAttribute("LISTINFO", map.get("LISTINFO"));
	request.setAttribute("CONDITIONMAP", map.get("CONDITIONMAP"));	
	return (String)map.get("RESULT");
	}

public String similar_SelectInit(Map paraMap){
		HttpServletRequest request = (HttpServletRequest)paraMap.get("REQUEST");
		Map map = (Map)paraMap.get("RESULTMAP");
		
		
		request.setAttribute("CONDITIONMAP", map.get("CONDITIONMAP"));	
		return (String)map.get("RESULT");
	}
	
}

